package _2022.day._015_最小公倍数;

import java.util.Scanner;

/**
 * @author： YHSimon
 * @date： 2022-09-18 14:46
 */
public class Solution {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        System.out.println("请输入两个数：");
        int a=in.nextInt();
        int b=in.nextInt();
        int mult=a*b;
        while(a%b!=0){
            int mod=a%b;
            a=b;
            b=mod;
        }
        System.out.println("最大公约数为: "+b);
        System.out.println("最小公倍数为: "+mult/b);
    }
}
